package cn.net.yugu.doraemon.netty.protocol.msg07;

import cn.net.yugu.doraemon.netty.protocol.MsgCode;
import io.netty.buffer.ByteBuf;

/**
 * 开门通知（同01号协议 加  开箱门状态）
 */
public class Msg071000009 extends Msg071 {

    public byte lockNum; //锁号
    public byte boxType; //箱子类型
    public byte openBoxStatus;

    @Override
    public int getMsgCode() {
        return MsgCode.MSG_071000009.getCode();
    }

    @Override
    public void readData(ByteBuf buffer) {
        lockNum = buffer.readByte();
        boxType = buffer.readByte();
        openBoxStatus = buffer.readByte();
    }

    @Override
    public void writeData(ByteBuf buffer) {
        buffer.writeByte(lockNum);
        buffer.writeByte(boxType);
        buffer.writeByte(openBoxStatus);
    }
}
